<?php

use  Biz\service\Album\WikiListService;

class WikiListAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_NOTHING;

    public function main()
    {


        $album_id = $this->getRequest()->getPost('album_id', 0);
        $page = $this->getRequest()->getPost('page', 1);//分类id
        if(empty($album_id)){
            throw new Exception('album_id参数缺失');
        }
        $list = [];
        if($album_id ){
            $list =  WikiListService::getGoodsList($album_id , $page);
        }
        $this->setSuccess(["total" => count($list),'goods_list' =>$list]);
    }
}